package com.hannesdorfmann.mosby3.mvi.integrationtest.lifecycle.componetcotainer;

import com.hannesdorfmann.mosby3.mvi.integrationtest.ResourceTable;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;

public class ComponentContainerFinishOnActiveAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_component_container_finish_on_start_container);
//        super.setMainRoute(ComponentContainerFinishOnActiveAbilitySlice.class.getName());

    }

    @Override
    protected void onActive() {
        super.onActive();
        terminateAbility();
    }

    public ComponentContainerFinishOnStartLayout getLayout() {
        ComponentContainerFinishOnStartLayout mviLayout = (ComponentContainerFinishOnStartLayout) findComponentById(ResourceTable.Id_mviLayout);
        mviLayout.setmComponetContext(this);
        return mviLayout;
    }
}

